package com.infore.airsupervise.bean;

import com.infore.airsupervise.R;
import com.infore.airsupervise.ui.activity.AlarmActivity;
import com.infore.airsupervise.ui.activity.AlarmStatisticActivity;
import com.infore.airsupervise.ui.activity.CompareAnalyzeActivity;
import com.infore.airsupervise.ui.activity.DispatchActivity;
import com.infore.airsupervise.ui.activity.EventsListActivity;
import com.infore.airsupervise.ui.activity.HandleEventsListActivity;
import com.infore.airsupervise.ui.activity.HotAnalyzeActivity;
import com.infore.airsupervise.ui.activity.NewMissionListActivity;
import com.infore.airsupervise.ui.activity.SiteMainCreateActivity;
import com.infore.airsupervise.ui.activity.LicenseSearchActivity;
import com.infore.airsupervise.ui.activity.PointAnalyzeActivity;
import com.infore.airsupervise.ui.activity.PointAnalyzeQueryActivity;
import com.infore.airsupervise.ui.activity.PolluterSearchActivity;
import com.infore.airsupervise.ui.activity.QuestionCheckActivity;
import com.infore.airsupervise.ui.activity.HistorySortActivity;
import com.infore.airsupervise.ui.activity.RealTimeSortActivity;
import com.infore.airsupervise.ui.activity.StationListActivity;
import com.infore.airsupervise.ui.activity.SurveyHistoryActivity;

import java.util.ArrayList;
import java.util.List;

/**
 * 菜单实体类
 */

public class MenuE extends BaseEntity {

    private int mId;
    private int icon;
    private String title;
    private String desc;
    private int badgeCount;         // 徽章总数
    private Class firstActivity;    // 第一个目标界面
    private Class secondActivity;   // 第二个目标界面

    public MenuE(int mId, int icon, String title, String desc, Class firstActivity) {
        this.mId = mId;
        this.icon = icon;
        this.title = title;
        this.desc = desc;
        this.firstActivity = firstActivity;
    }

    public MenuE(int mId, int icon, String title, String desc, Class firstActivity, Class secondActivity) {
        this.mId = mId;
        this.icon = icon;
        this.title = title;
        this.desc = desc;
        this.firstActivity = firstActivity;
        this.secondActivity = secondActivity;
    }

    /**
     * 获取实时菜单列表
     * @return
     */
    public static List<MenuE> getWarningMenuList() {
        List<MenuE> mList = new ArrayList<>();

        MenuE realTime = new MenuE(1, R.drawable.list, "实时排名", "查看实时排名列表", RealTimeSortActivity.class);
        MenuE realWarning = new MenuE(2, R.drawable.warning, "实时预警", "查看实时预警列表", AlarmActivity.class);
        MenuE realDispatch = new MenuE(3, R.drawable.hand, "实时调度", "根据各类实时分析，辅助调度、决策", DispatchActivity.class);

        mList.add(realTime);
        mList.add(realWarning);
        mList.add(realDispatch);

        return mList;
    }


    /**
     * 获取执法菜单列表
     * @return
     */
    public static List<MenuE> getLawMenuList() {
        List<MenuE> mList = new ArrayList<>();
        MenuE mission = new MenuE(1, R.drawable.ic_event_analysis, "我的任务", "创建发起任务，实时跟进", NewMissionListActivity.class);
        mission.badgeCount = 2;
        MenuE lawingSite = new MenuE(2, R.drawable.ic_menu_plan, "现场执法", "做笔录，现场取证", SiteMainCreateActivity.class);
        MenuE questionReport = new MenuE(3, R.drawable.ic_menu_report, "问题上报", "对巡检问题进行上报", QuestionCheckActivity.class);
        MenuE resource = new MenuE(4, R.drawable.ic_pollution_source_query, "污染源查询", "", PolluterSearchActivity.class);
        MenuE license = new MenuE(5, R.drawable.ic_query_license, "排污许可证查询", "", LicenseSearchActivity.class);

        mList.add(mission);
        mList.add(lawingSite);
        mList.add(questionReport);
        mList.add(resource);
        mList.add(license);

        return mList;
    }

    /**
     * 获取统计菜单列表
     * @return
     */
    public static List<MenuE> getChartMenuList() {
        List<MenuE> mList = new ArrayList<>();
        MenuE m1 = new MenuE(1, R.drawable.hot, "热力分析", "", HotAnalyzeActivity.class);
        MenuE m2 = new MenuE(2, R.drawable.site, "点位分析", "", PointAnalyzeActivity.class);
        MenuE m3 = new MenuE(3, R.drawable.duibi, "同期对比", "", CompareAnalyzeActivity.class);
        MenuE m4 = new MenuE(4, R.drawable.chaxun, "站点对比", "", PointAnalyzeQueryActivity.class);
        MenuE m5 = new MenuE(5, R.drawable.paiming, "历史排名", "", HistorySortActivity.class);
        MenuE m6 = new MenuE(6, R.drawable.xinxi, "基本信息", "", StationListActivity.class);
   //     MenuE m4 = new MenuE(4, R.drawable.chaxun, "点位数据\n查询", "", PointAnalyzeQueryActivity.class);
    //    MenuE m6 = new MenuE(5, R.drawable.baojin, "预警统计", "", AlarmStatisticActivity.class);
  //      MenuE m9 = new MenuE(9, R.drawable.kancha, "勘察历史", "", SurveyHistoryActivity.class);

        mList.add(m1);
        mList.add(m2);
        mList.add(m3);
        mList.add(m4);
        mList.add(m5);
        mList.add(m6);
//        mList.add(m7);
  //      mList.add(m8);
   //     mList.add(m9);

        return mList;
    }

    /**
     * 事件菜单列表
     * @return
     */
    public static List<MenuE> getEventsMenuList(){
        List<MenuE> mList = new ArrayList<>();
        MenuE m1 = new MenuE(1, R.drawable.paiqian, "事件记录", "查看并新建污染事件", EventsListActivity.class);
        MenuE m2 = new MenuE(2, R.drawable.report, "事件处理", "当前需要处理的事件", HandleEventsListActivity.class);
        mList.add(m1);
        mList.add(m2);
        return mList;
    }



    public int getmId() {
        return mId;
    }

    public void setmId(int mId) {
        this.mId = mId;
    }

    public int getIcon() {
        return icon;
    }

    public void setIcon(int icon) {
        this.icon = icon;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getBadgeCount() {
        return badgeCount;
    }

    public void setBadgeCount(int badgeCount) {
        this.badgeCount = badgeCount;
    }

    public Class getFirstActivity() {
        return firstActivity;
    }

    public void setFirstActivity(Class firstActivity) {
        this.firstActivity = firstActivity;
    }

    public Class getSecondActivity() {
        return secondActivity;
    }

    public void setSecondActivity(Class secondActivity) {
        this.secondActivity = secondActivity;
    }
}
